package com.zhongan.user.manager;

import com.zhongan.user.api.UserApi;
import com.zhongan.user.api.dto.UserDto;
import com.zhongan.user.model.Users;
import com.zhongan.user.repository.UsersRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户服务接口实现
 * @author za-shaojian
 */
@Service
public class UserManager implements UserApi {
    private static final Logger logger = LoggerFactory.getLogger(UserManager.class);

    @Autowired
    private UsersRepository userRepository;

    public UserDto findByUsername(String userName) {
        return userRepository.findByUsername(userName);
    }

    public Integer add(Integer a, Integer b) {
        return a+b;
    }
}
